<?php defined('SYSPATH') OR die('No direct access allowed.'); ?>
<?php echo $cabecalho; ?>
<?php echo $menu_esq; ?>
<div id="mainContent">
<h1>Editar Actions</h1>
<div><?php echo $msg;?></div>
<p>
<?php echo form::open("action/salvar"); ?>
<table width="100%" border="1">
      <tr>
        <td>nome</td>
        <td>valor</td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
      <?php foreach($actions as $action){?>
      <?php echo form::hidden('id[]', $action->id)?>
	  <tr>
        <td>Nome</td>
        <td><?php echo form::input("name[]", $action->name); ?></td>
      </tr>
      <tr>
        <td>Type</td>
        <td><?php echo form::input("type[]", $action->type); ?></td>
      </tr>
      <tr>
        <td>Modulo</td>
        <td><?php echo form::dropdown('modules', $modules, $action->module->id); ?> </td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
      <?php }?>
      <tr>
        <td><?php echo form::submit('enviar', 'Editar')?>&nbsp;</td>
        <td><?php echo html::anchor('#', 'Voltar', array('onClick'=>'javascript:history.back(1)'))?>&nbsp;</td>
      </tr>
    </table>
<?php echo form::close(); ?>
</p>
<!-- end #mainContent --></div>
<?php echo $rodape; ?>